<?php
/**
 * wp-foundation theme-options.php
 */
require_once(THEMELIB . '/classes/readdir.php');
$themename = "foundation";
$shortname = "fd";
$options = array (

//////// TABS NAVIGATION ////////////
array("type" => "tabs-wrap-start"),

///////////////// BEGIN TAB AREA Layout /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-1"),
array("type" => "tabs-minor-heading", "name" => "Layout Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "nav1"),

array(    
	"name" => "Column Structure and Expansion",
	"id" => $shortname."_column_structure",
	"type" => "select",
	"std" => "2 Column Fixed With Nav Right",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("2 Column Fixed With Nav Right", "2 Column Fixed With Nav Left", "2 Column Fluid With Nav Left")),

array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Layout /////////////////////////////////


///////////////// BEGIN TAB AREA Header Area /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-2"),
array("type" => "tabs-minor-heading", "name" => "Header Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "nav1"),

array(    
	"name" => "Show/Hide Logo Image",
	"id" => $shortname."_logo_insert",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Hide")),
	
array(    
	"name" => "Upload Logo Image",
	"id" => $shortname."_logo_image_url",
	"type" => "text-link",
	"std" => "",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),
	
array(    
	"name" => "Logo Image Title",
	"id" => $shortname."_logo_image_title",
	"type" => "text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),
	
array(    
	"name" => "Logo Image Alt",
	"id" => $shortname."_logo_image_alt",
	"type" => "text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),

array(    
	"name" => "Site Title",
	"id" => $shortname."_site_title_toggle",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Hide")),
	
array(    
	"name" => "Site Description",
	"id" => $shortname."_site_description_toggle",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Hide")),

array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Header Area /////////////////////////////////


///////////////// BEGIN TAB AREA Navigation /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-3"),
array("type" => "tabs-minor-heading", "name" => "Navigation Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "nav1"),

array(    
	"name" => "Top Navigation Placement",
	"id" => $shortname."_nav_placement",
	"type" => "select",
	"std" => "Inside Header",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Inside Header", "Above Header", "Below Header", "Remove")),

array(    
	"name" => "Enable/Disable Home Link",
	"id" => $shortname."_home_link",
	"type" => "select",
	"std" => "Enable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Enable", "Disable")),

array(
	"name" => "Include Pages In Top Nav",
	"id" => $shortname."_include_page",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textincpage"),

array(
	"name" => "Exclude Pages In Top Nav",
	"id" => $shortname."_exclude_page",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textexpage"),

array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Navigation /////////////////////////////////


///////////////// BEGIN TAB AREA Banner /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-4"),
array("type" => "tabs-minor-heading", "name" => "Banner Options", "image" => "media"),
array("type" => "tabs-minor-start"),

array("type" => "tabs-side-start"),
array("type" => "tabs-side", "name" => "ban1", "option" => "Banner Effects"),
array("type" => "tabs-side", "name" => "ban2", "option" => "Banner Slide 1"),
array("type" => "tabs-side", "name" => "ban3", "option" => "Banner Slide 2"),
array("type" => "tabs-side", "name" => "ban4", "option" => "Banner Slide 3"),
array("type" => "tabs-side", "name" => "ban5", "option" => "Banner Slide 4"),
array("type" => "tabs-side", "name" => "ban6", "option" => "Banner Slide 5"),
array("type" => "tabs-side-end"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "ban1"),

array(    
	"name" => "Enable/Disable Home Banner",
	"id" => $shortname."_enable_home_banner",
	"type" => "select",
	"std" => "Enable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Enable", "Disable")),

array(    
	"name" => "Home Banner Location",
	"id" => $shortname."_home_banner_location",
	"type" => "select",
	"std" => "Below Header",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Below Header", "Above Header")),

array(    
	"name" => "Choose Banner Effect",
	"id" => $shortname."_home_banner_effect",
	"type" => "select",
	"std" => "fade",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("fade","blindX", "blindY", "blindZ", "cover", "curtainX", "curtainY", "fadeZoom", "growX", "growY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollHorz", "scrollVert", "shuffle", "slideX", "slideY", "toss", "turnUp", "turnDown", "turnLeft", "turnRight", "uncover", "wipe", "zoom")),

array(    
	"name" => "Banner Effect Speed (Milliseconds)",
	"id" => $shortname."_home_banner_effect_speed",
	"type" => "text",
	"std" => "500",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),
	
array(    
	"name" => "Banner Timeout Between Effects (Milliseconds)",
	"id" => $shortname."_home_banner_timeout",
	"type" => "text",
	"std" => "7000",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),

array(    
	"name" => "Pause Banner On Hover",
	"id" => $shortname."_home_banner_pause",
	"type" => "select",
	"std" => "true",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("true", "false")),
	
array(    
	"name" => "Enable Banner Pager",
	"id" => $shortname."_home_banner_pager",
	"type" => "select",
	"std" => "Enable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Enable", "Disable")),
	
array(    
	"name" => "Enable Banner Prev/Next Navigation",
	"id" => $shortname."_home_banner_nav",
	"type" => "select",
	"std" => "Enable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Enable", "Disable")),
	
array(
	"name" => "Write Custom Transition/Effect",
	"id" => $shortname."_home_banner_custom_effect",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 1

//begin panel 2
array("type" => "tabs-minor-panel-start", "name" => "ban2"),

array(    
	"name" => "Include Image and/or Text in Slide",
	"id" => $shortname."_slide1_content",
	"type" => "select",
	"std" => "image",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("image", "text", "image and text")),

array(
	"name" => "Image 1 Url",
	"id" => $shortname."_image1_url",
	"std" => get_bloginfo( 'template_directory' ) . "/images/splash/splash1.jpg",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text-link"),
	
array(    
	"name" => "Add Image as CSS Background",
	"id" => $shortname."_slide1_add_as_background",
	"type" => "select",
	"std" => "NO",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("NO", "YES")),
	
array(
	"name" => "Image 1 Link",
	"id" => $shortname."_image1_link",
	"std" => "#",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 1 Alt Tag",
	"id" => $shortname."_image1_alt",
	"std" => "Image 1",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 1 Title Tag",
	"id" => $shortname."_image1_title",
	"std" => "Image 1 Title",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 1 Width",
	"id" => $shortname."_image1_width",
	"std" => "960",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 1 Height",
	"id" => $shortname."_image1_height",
	"std" => "350",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),
	
array(
	"name" => "Add Text To Slide",
	"id" => $shortname."_slide1_text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 2

//begin panel 3
array("type" => "tabs-minor-panel-start", "name" => "ban3"),

array(    
	"name" => "Enable/Disable Image 2",
	"id" => $shortname."_image2_active",
	"std" => "Enable",
	"type" => "select",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Enable", "Disable")),
	
array(    
	"name" => "Include Image and/or Text in Slide",
	"id" => $shortname."_slide2_content",
	"type" => "select",
	"std" => "image",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("image", "text", "image and text")),

array(
	"name" => "Image 2 Url",
	"id" => $shortname."_image2_url",
	"std" => get_bloginfo( 'template_directory' ) . "/images/splash/splash2.jpg",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text-link"),

array(    
	"name" => "Add Image as CSS Background",
	"id" => $shortname."_slide2_add_as_background",
	"type" => "select",
	"std" => "NO",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("NO", "YES")),

array(
	"name" => "Image 2 Link",
	"id" => $shortname."_image2_link",
	"std" => "#",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 2 Alt Tag",
	"id" => $shortname."_image2_alt",
	"std" => "Image 2",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 2 Title Tag",
	"id" => $shortname."_image2_title",
	"std" => "Image 2 Title",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 2 Width",
	"id" => $shortname."_image2_width",
	"std" => "960",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 2 Height",
	"id" => $shortname."_image2_height",
	"std" => "350",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),
	
array(
	"name" => "Add Text To Slide",
	"id" => $shortname."_slide2_text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 3

//begin panel 4
array("type" => "tabs-minor-panel-start", "name" => "ban4"),

array(    
	"name" => "Enable/Disable Image 3",
	"id" => $shortname."_image3_active",
	"std" => "Disable",
	"type" => "select",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Disable", "Enable")),
	
array(    
	"name" => "Include Image and/or Text in Slide",
	"id" => $shortname."_slide3_content",
	"type" => "select",
	"std" => "image",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("image", "text", "image and text")),

array(
	"name" => "Image 3 Url",
	"id" => $shortname."_image3_url",
	"std" => get_bloginfo( 'template_directory' ) . "/images/splash/splash3.jpg",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text-link"),
	
	array(    
	"name" => "Add Image as CSS Background",
	"id" => $shortname."_slide3_add_as_background",
	"type" => "select",
	"std" => "NO",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("NO", "YES")),

array(
	"name" => "Image 3 Link",
	"id" => $shortname."_image3_link",
	"std" => "#",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 3 Alt Tag",
	"id" => $shortname."_image3_alt",
	"std" => "Image 3",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 3 Title Tag",
	"id" => $shortname."_image3_title",
	"std" => "Image 3 Title",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 3 Width",
	"id" => $shortname."_image3_width",
	"std" => "960",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 3 Height",
	"id" => $shortname."_image3_height",
	"std" => "350",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),
array(
	"name" => "Add Text To Slide",
	"id" => $shortname."_slide3_text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 4


//begin panel 5
array("type" => "tabs-minor-panel-start", "name" => "ban5"),

array(    
	"name" => "Enable/Disable Image 4",
	"id" => $shortname."_image4_active",
	"std" => "Disable",
	"type" => "select",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Disable", "Enable")),
	
array(    
	"name" => "Include Image and/or Text in Slide",
	"id" => $shortname."_slide4_content",
	"type" => "select",
	"std" => "image",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("image", "text", "image and text")),

array(
	"name" => "Image 4 Url",
	"id" => $shortname."_image4_url",
	"std" => get_bloginfo( 'template_directory' ) . "/images/splash/splash4.jpg",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text-link"),
	array(    
	"name" => "Add Image as CSS Background",
	"id" => $shortname."_slide4_add_as_background",
	"type" => "select",
	"std" => "NO",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("NO", "YES")),

array(
	"name" => "Image 4 Link",
	"id" => $shortname."_image4_link",
	"std" => "#",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 4 Alt Tag",
	"id" => $shortname."_image4_alt",
	"std" => "Image 4",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 4 Title Tag",
	"id" => $shortname."_image4_title",
	"std" => "Image 4 Title",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 4 Width",
	"id" => $shortname."_image4_width",
	"std" => "960",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 4 Height",
	"id" => $shortname."_image4_height",
	"std" => "450",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),
array(
	"name" => "Add Text To Slide",
	"id" => $shortname."_slide4_text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 5

//begin panel 6
array("type" => "tabs-minor-panel-start", "name" => "ban6"),

array(    
	"name" => "Enable/Disable Image 5",
	"id" => $shortname."_image5_active",
	"std" => "Disable",
	"type" => "select",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Disable", "Enable")),
	
array(    
	"name" => "Include Image and/or Text in Slide",
	"id" => $shortname."_slide5_content",
	"type" => "select",
	"std" => "image",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("image", "text", "image and text")),

array(
	"name" => "Image 5 Url",
	"id" => $shortname."_image5_url",
	"std" => get_bloginfo( 'template_directory' ) . "/images/splash/splash5.jpg",
	"infolink" => "Upload image <a href='media-upload.php?type=image&TB_iframe=true' class='thickbox'>here</a> and paste the resulting image link in the box below",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text-link"),
	
	array(    
	"name" => "Add Image as CSS Background",
	"id" => $shortname."_slide5_add_as_background",
	"type" => "select",
	"std" => "NO",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("NO", "YES")),

array(
	"name" => "Image 5 Link",
	"id" => $shortname."_image5_link",
	"std" => "#",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 5 Alt Tag",
	"id" => $shortname."_image5_alt",
	"std" => "Image 5",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 5 Title Tag",
	"id" => $shortname."_image5_title",
	"std" => "Image 5 Title",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 5 Width",
	"id" => $shortname."_image5_width",
	"std" => "960",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),

array(
	"name" => "Image 5 Height",
	"id" => $shortname."_image5_height",
	"std" => "350",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "text"),
array(
	"name" => "Add Text To Slide",
	"id" => $shortname."_slide5_text",
	"std" => "",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 6


array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Banner /////////////////////////////////

///////////////// BEGIN TAB AREA Post Options /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-5"),
array("type" => "tabs-minor-heading", "name" => "Post Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "nav1"),

array(    
	"name" => "Show/Hide Post Meta Data",
	"id" => $shortname."_post_meta",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Hide")),

array(
	"name" => "Post Meta Format",
	"id" => $shortname."_post_meta_format",
	"std" => '<span class="meta-prep meta-prep-author">by </span><span class="author vcard"><a class="url fn n" href="%authorlink%" title="%authorname%">%authorname%</a></span>%|%<span class="meta-prep meta-prep-entry-date">Published </span><span class="entry-date"><abbr class="published" title="%postdatefull%">%postdate% </abbr></span>',
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array(    
	"name" => "Show/Hide Post Utility Data",
	"id" => $shortname."_post_utility",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Hide")),
	
array(
	"name" => "Post Utility Format",
	"id" => $shortname."_post_utility_format",
	"std" => '<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links">Posted in </span><a href="%categorylink%">%category%</a></span>%|%<span class="tag-links">%tags%</span>%|%<span class="comments-link">%commentcount%</span>',
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"type" => "textarea"),

array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Post Options /////////////////////////////////

///////////////// BEGIN TAB AREA Sidebar /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-6"),
array("type" => "tabs-minor-heading", "name" => "Sidebar/Widget Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

array("type" => "tabs-side-start"),
array("type" => "tabs-side", "name" => "sidebar1", "option" => "Search Options"),
array("type" => "tabs-side-end"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "sidebar1"),

array(    
	"name" => "Custom Search Enable/Disable",
	"id" => $shortname."_custom_search",
	"type" => "select",
	"std" => "Disable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Disable", "Enable")),
	
array(    
	"name" => "Custom Search Placement",
	"id" => $shortname."_custom_search_placement",
	"type" => "select",
	"std" => "Above Primary Widget",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Above Primary Widget", "Above Header", "Inside Header", "Below Header")),
	
array(    
	"name" => "Heading Text",
	"id" => $shortname."_search_heading_text",
	"type" => "text",
	"std" => "Search",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),
	
array(    
	"name" => "Search Button Show/Remove",
	"id" => $shortname."_search_buttom_show",
	"type" => "select",
	"std" => "Show",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Show", "Remove")),
	
array(    
	"name" => "Search Button Text",
	"id" => $shortname."_search_button_text",
	"type" => "text",
	"std" => "Search",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),
	
array(    
	"name" => "Default Search Text",
	"id" => $shortname."_default_search_text",
	"type" => "text",
	"std" => "Enter Search Terms",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),

array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Sidebar /////////////////////////////////


///////////////// BEGIN TAB AREA Footer /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-7"),
array("type" => "tabs-minor-heading", "name" => "Footer Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

array("type" => "tabs-side-start"),
array("type" => "tabs-side", "name" => "sidebar1", "option" => "Widget Options"),
array("type" => "tabs-side-end"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "footer1"),

array(    
	"name" => "Footer Widget Area",
	"id" => $shortname."_footer_widget_area_enable",
	"type" => "select",
	"std" => "Disable",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/",
	"options" => array("Disable", "Enable")),

array(    
	"name" => "Number of footer widgets",
	"id" => $shortname."_footer_widget_area_number",
	"type" => "text",
	"std" => "0",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),


array("type" => "tabs-minor-panel-end"),
//end panel 1

array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Footer /////////////////////////////////

///////////////// BEGIN TAB AREA Presets/Backup /////////////////////////////////
array("type" => "tabs-minor-wrap-start", "name" => "tabs-8"),
array("type" => "tabs-minor-heading", "name" => "Preset/Backup Options", "image" => "pages"),
array("type" => "tabs-minor-start"),

array("type" => "tabs-side-start"),
array("type" => "tabs-side", "name" => "back1", "option" => "Options"),
array("type" => "tabs-side", "name" => "back2", "option" => "Manage Backup Files"),
array("type" => "tabs-side-end"),

//begin panel 1
array("type" => "tabs-minor-panel-start", "name" => "back1"),


array(    
	"name" => "Backup Foundation Theme Options",
	"id" => $shortname."_download_backup_file",
	"type" => "backup-link",
	"std" => "0",
	"desc" => "More info at our site.",
	"infotext" => "Backup current options to server and download.",
	"linkclass" => "none",
	"infolink" => "/lib/extensions/options-backup/options-download.php",
	"link" => "http://www.wp-foundation.com/"),


array("type" => "tabs-minor-panel-end"),
//end panel 1

//begin panel 2
array("type" => "tabs-minor-panel-start", "name" => "back2"),


array(    
	"name" => "Backup Files List",
	"id" => $shortname."_backup_file_list",
	"type" => "backup-list",
	"std" => "0",
	"desc" => "More info at our site.",
	"link" => "http://www.wp-foundation.com/"),

array(    
	"name" => "Upload A Backup File",
	"id" => $shortname."_upload_backup_file",
	"type" => "backup-link",
	"std" => "0",
	"desc" => "More info at our site.",
	"infotext" => "Upload File To Server.",
	"linkclass" => "thickbox",
	"infolink" => "/lib/extensions/options-backup/options-upload.php?type=image&TB_iframe=true",
	"link" => "http://www.wp-foundation.com/"),

array("type" => "tabs-minor-panel-end"),
//end panel 2


array("type" => "tabs-minor-end"),
array("type" => "tabs-minor-wrap-end"),
///////////////// END TAB AREA Presets/Backup /////////////////////////////////

array("type" => "tabs-wrap-end"),
);
/////////////////////////////////////////////

/*Add a Theme Options Page*/
function mytheme_add_admin() {
    global $themename, $shortname, $options;
    require(THEMELIB . '/classes/upload.php');
    if ( $_GET['page'] == basename(__FILE__) ) {
        if ( 'save' == $_REQUEST['action'] ) {
                foreach ($options as $value) {
                    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
                foreach ($options as $value) {
                    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }
                header("Location: themes.php?page=theme-options.php&saved=true");
                die;
        } else if( 'reset' == $_REQUEST['action'] ) {
            foreach ($options as $value) {
                delete_option( $value['id'] ); }
            header("Location: themes.php?page=theme-options.php&reset=true");
            die;
        }}
    add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}

function mytheme_admin() {
    global $themename, $shortname, $options;
	if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' '.__('settings saved.','foundation').'</strong></p></div>';
    if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' '.__('settings reset.','foundation').'</strong></p></div>';
    if ( $_REQUEST['upload'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' '.__('file uploaded.','foundation').'</strong></p></div>';
    if ( $_REQUEST['activate'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' '.__('new options file activated.','foundation').'</strong></p></div>';
    if ( $_REQUEST['delete'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' '.__('options file deleted.','foundation').'</strong></p></div>';
?>


<div class="fd-options-wrap">

<form method="post">

<?php foreach ($options as $value) {
switch ( $value['type'] ) {

case "selections-wrap-start": ?>
<div id="<?php echo $value['cssid']; ?>" class="fd-selections-wrap">
<?php break;

case "selections-wrap-end": ?>
</div>
<?php break;

case "misc": ?>
<div class="fd-misc">
	<?php echo $value['name']; ?>
</div>
<?php break;

case "title": ?>
<div id="<?php echo $value['cssid']; ?>" class="fd-selections-title">
<div class="<?php echo $value['imageStyle']; ?> fd-title-icon">&nbsp;</div>
	<?php echo $value['name']; ?>
<div class="icon-open fd-title-toggle">&nbsp;</div>
</div>
<?php break;

case 'text': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
	<input class="fd-option-input" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id'] )); } else { echo stripslashes($value['std']); } ?>" />
</div>
<?php
break;

case 'text-link': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
    <div><?php echo $value['infolink']; ?></div>
	<input class="fd-option-input" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id'] )); } else { echo stripslashes($value['std']); } ?>" />
</div>
<?php
break;

case 'backup-link': 
?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
    <div><a class="<?php echo $value['linkclass'] ?>" href="<?php echo bloginfo('template_url'); ?><?php echo $value['infolink'] ?>"><?php echo $value['infotext'] ?></a></div>
</div>
<?php
break;

case 'backup-list': 

$base_dir = THEMELIB . '/extensions/options-backup/'; // the directory this script is in
$dir = new readDir(); // instantiate our class
// set the directory to read
if (!$dir->setPath( $base_dir )) {
    die($dir->error());
} 
// set recursive reading of sub folders
$dir->readRecursive(false); 
// set a function to call when a new file is read
if (!$dir->setEvent( 'readDir_file', 'my_file_function' )) {
    die($dir->error());
} 
// our custom function called when a new file is read
function my_file_function($path, $filename) {
    if (preg_match("/\.xml$/i", $filename)) {
    ?>
        <tr>
        	<td>
        		<a href="../wp-content/themes/wp-foundation/lib/extensions/options-backup/<?php echo $filename; ?>" target="_blank"><?php echo $filename; ?></a>
        	</td>
        	<td>
        		<a class="activate" href="<?php bloginfo('template_directory'); ?>/lib/extensions/options-backup/options-update.php?file=<?php echo $filename; ?>">Activate</a>
        	</td>
        	<td>
        		<a class="delete" href="<?php bloginfo('template_directory'); ?>/lib/extensions/options-backup/options-update.php?file=<?php echo $filename; ?>&delete=true">Delete</a>
        	</td>
        </tr>
    <?php
    } 
}  	
?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
	    <span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
    <div id="fd-backup-list">
    <?php 
    echo '<table id="backup-list-table">';
    echo '<thead><tr><th>File Name <em>(click to view)</em></th><th>Activate</th><th>Delete</th></tr></thead>';
    //echo '<tfoot><tr><th colspan="3">Backup File Collection</th></tr></tfoot>';
    echo '<tbody>';
		// read the dir
		if ( !$dir->read() ) {
    		die($dir->error());
		}
	echo '</tbody>';
	echo '</table>';
	?>
	</div>
</div>
<?php
break;

case 'textarea': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
		<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
	<textarea name="<?php echo $value['id']; ?>" class="fd-option-textbox" type="<?php echo $value['type']; ?>" cols="45" rows="6"><?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id'] )); } else { echo stripslashes($value['std']); } ?></textarea>
</div>
<?php
break;

case 'select': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
    <div class="fd-option-select-wrap">
	<select class="fd-option-select" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select>
    </div>
</div>
<?php
break;

case "checkbox": ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><?php echo $value['name']; ?></div>
		<?php if(get_option($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = "";} ?>
        <input class="fd-option-checkbox" type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
        <div class="fd-option-desc"><?php echo $value['desc']; ?></div>
</div>
<?php
break;

case 'textincpage': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
	<input class="fd-option-input" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="text" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id'] )); } else { echo stripslashes($value['std']); } ?>" />
	<?php
	 wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'fd-select-include-pages', 'show_option_none' => __('Select pages to include'), 'sort_column'=> 'menu_order, post_title'));
	?>
</div>
<?php
break;


case 'textexpage': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><span><?php echo $value['name']; ?></span>
    	<span class="fd-option-desc ui-state-default fd-option-icon">
        	<a href="<?php echo $value['link']; ?>" target="_blank" class="ui-icon ui-icon-info" title="<?php echo $value['desc']; ?>">&nbsp;</a>
        </span>
    </div>
	<input class="fd-option-input" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="text" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id'] )); } else { echo stripslashes($value['std']); } ?>" />
	<?php
	 wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'fd-select-exclude-pages', 'show_option_none' => __('Select pages to exclude'), 'sort_column'=> 'menu_order, post_title'));
	?>
</div>
<?php
break;

case 'textimgop': ?>
<div class="fd-option-wrap">
	<div class="fd-option-heading"><?php echo $value['name']; ?></div>

<?php
break;

case "textimgop-wrap-end": ?>
</div>
<?php break; ?>

<?php case "tabs-wrap-start": ?>
<div id="tabs">
    <ul class="top-tabs-nav">
    	<li><a href="#tabs-1">Site Layout</a></li>
    	<li><a href="#tabs-2">Header</a></li>
        <li><a href="#tabs-3">Top Navigation</a></li>
        <li><a href="#tabs-4">Home Banner</a></li>
        <li><a href="#tabs-5">Posts</a></li>
        <li><a href="#tabs-6">Sidebar</a></li>
        <li><a href="#tabs-7">Footer</a></li>
        <li><a href="#tabs-8">Preset/Backup</a></li>
    </ul>
<?php break; ?>

<?php case "tabs-minor-wrap-start": ?>    
    <div id="<?php echo $value['name']; ?>" class="tabs-minor-wrap">
<?php break; ?>

<?php case "tabs-minor-heading": ?> 
        <div class="tabs-minor-heading"><span class="heading-<?php echo $value['image']; ?>">&nbsp;</span><?php echo $value['name']; ?></div>
<?php break; ?>

<?php case "tabs-minor-start": ?> 
        <div class="tabs-minor">
<?php break; ?>

<?php case "tabs-side-start": ?> 
            <ul class="tabs-side">
<?php break; ?>

<?php case "tabs-side": ?>
                <li><a href="#tabs-side-<?php echo $value['name']; ?>"><?php echo $value['option']; ?></a></li>
<?php break; ?>
                
<?php case "tabs-side-end": ?>
            </ul>
<?php break; ?>

<?php case "tabs-minor-panel-start": ?>
            <div class="tabs-minor-panel" id="tabs-side-<?php echo $value['name']; ?>">
<?php break; ?>

<?php case "tabs-minor-panel-end": ?>
            </div>
<?php break; ?>
            
<?php case "tabs-minor-end": ?>
        </div>
<?php break; ?>
        
<?php case "tabs-minor-wrap-end": ?>  
    </div><!-- .eof #tabs-minor-wrap -->
<?php break; ?>

<?php case "tabs-wrap-end": ?>
</div><!-- .eof #tabs -->
<?php break; ?>

<?php 	}// .eof switch 
		}// .eof foreach
		?>
 
    <p class="submit"  id="fd-save">
        <input name="save" type="submit" value="Save changes" />
        <input type="hidden" name="action" value="save" />
    </p>
</form>

<form method="post">
    <p class="submit"  id="fd-reset">
        <input name="reset" type="submit" value="Reset" />
        <input type="hidden" name="action" value="reset" />
    </p>
</form>

<?php
}


add_action('admin_menu', 'mytheme_add_admin');
/*End of Add a Theme Options Page*/

/*End of Theme Options =======================================*/

?>